/**
 * index页面的widget配置
 * @copyright 火星科技 mars3d.cn
 * @author 火星渣渣灰 2022-02-19
 */
import { defineAsyncComponent, markRaw } from "vue"
import { WidgetState } from "@mars/common/store/widget"
import { StoreOptions } from "vuex"

const store: StoreOptions<WidgetState> = {
  state: {
    widgets: [
      // ================= 基础通用widgets =================
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-basemap/index.vue"))),
        name: "manage-basemap",
        group: "manage"
      },
      // ================= 监测点位加载 =================
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/service/sb-query/index.vue"))),
        name: "sb-query"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/service/graphic-cs/index.vue"))),
        name: "graphic-cs"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/service/show-3d/index.vue"))),
        name: "show-3d"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/service/noise-field/index.vue"))),
        name: "noise-field"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/service/source-area/index.vue"))),
        name: "source-area"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/service/complaint/index.vue"))),
        name: "complaint"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/service/tips-info/index.vue"))),
        name: "tips-info"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/service/noise-compare/index.vue"))),
        name: "noise-compare"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/service/fly/index.vue"))),
        name: "fly"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/service/sb-details/index.vue"))),
        name: "detailsSb"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/service/sb-details/zp-device.vue"))),
        name: "detailsZP"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/service/ai-model-page/index.vue"))),
        name: "ai-model-page"
      }
      
    ],
    openAtStart: ["sb-query", "graphic-cs", "tips-info"] //, "toolbar"
  }
}

export default store
